﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gx.Model.Entity
{
    [Table("LK_Transfer")]
    public class LKTransfer
    {
        [Key]
        private int _id;
        /// <summary>
        /// Id
        /// </summary>
        [Column("Id")]
        public int Id
        {
            get
            {
                return _id;
            }
            set { _id = value; }
        }


        private string _transferNo;
        /// <summary>
        /// 转卡单编号
        /// </summary>
        [Column("TransferNo")]
        public string TransferNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_transferNo))
                    _transferNo = string.Empty;
                return _transferNo;
            }
            set { _transferNo = value; }
        }


        private System.DateTime _transferTime;
        /// <summary>
        /// 转卡时间
        /// </summary>
        [Column("TransferTime")]
        public System.DateTime TransferTime
        {
            get
            {
                if (_transferTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _transferTime;
            }
            set { _transferTime = value; }
        }


        private int _inCustomerId;
        /// <summary>
        /// 转入客户;
        /// </summary>
        [Column("InCustomerId")]
        public int InCustomerId
        {
            get
            {
                return _inCustomerId;
            }
            set { _inCustomerId = value; }
        }


        private string _inCustomerNo;
        /// <summary>
        /// 转入客户编号
        /// </summary>
        [Column("InCustomerNo")]
        public string InCustomerNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_inCustomerNo))
                    _inCustomerNo = string.Empty;
                return _inCustomerNo;
            }
            set { _inCustomerNo = value; }
        }


        private string _inCustomerName;
        /// <summary>
        /// 转入客户名称
        /// </summary>
        [Column("InCustomerName")]
        public string InCustomerName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_inCustomerName))
                    _inCustomerName = string.Empty;
                return _inCustomerName;
            }
            set { _inCustomerName = value; }
        }


        private int _outCustomerId;
        /// <summary>
        /// 转出客户;
        /// </summary>
        [Column("OutCustomerId")]
        public int OutCustomerId
        {
            get
            {
                return _outCustomerId;
            }
            set { _outCustomerId = value; }
        }


        private string _outCustomerNo;
        /// <summary>
        /// 转出客户编号
        /// </summary>
        [Column("OutCustomerNo")]
        public string OutCustomerNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_outCustomerNo))
                    _outCustomerNo = string.Empty;
                return _outCustomerNo;
            }
            set { _outCustomerNo = value; }
        }


        private string _outCustomerName;
        /// <summary>
        /// 转出客户名称
        /// </summary>
        [Column("OutCustomerName")]
        public string OutCustomerName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_outCustomerName))
                    _outCustomerName = string.Empty;
                return _outCustomerName;
            }
            set { _outCustomerName = value; }
        }


        private string _contractNo;
        /// <summary>
        /// 合同编号
        /// </summary>
        [Column("ContractNo")]
        public string ContractNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_contractNo))
                    _contractNo = string.Empty;
                return _contractNo;
            }
            set { _contractNo = value; }
        }


        private int _rentalWarehouseType;
        /// <summary>
        /// 租仓类型(1:零仓,2:包仓)
        /// </summary>
        [Column("RentalWarehouseType")]
        public int RentalWarehouseType
        {
            get
            {
                return _rentalWarehouseType;
            }
            set { _rentalWarehouseType = value; }
        }


        private int _coldAlgorithm;
        /// <summary>
        /// 冷藏算法
        /// </summary>
        [Column("ColdAlgorithm")]
        public int ColdAlgorithm
        {
            get
            {
                return _coldAlgorithm;
            }
            set { _coldAlgorithm = value; }
        }


        private int _chargingUnit;
        /// <summary>
        /// 计费单位
        /// </summary>
        [Column("ChargingUnit")]
        public int ChargingUnit
        {
            get
            {
                return _chargingUnit;
            }
            set { _chargingUnit = value; }
        }


        private bool _isByTon;
        /// <summary>
        /// 按吨操作
        /// </summary>
        [Column("IsByTon")]
        public bool IsByTon
        {
            get
            {
                return _isByTon;
            }
            set { _isByTon = value; }
        }


        private int _cycle;
        /// <summary>
        /// 周期
        /// </summary>
        [Column("Cycle")]
        public int Cycle
        {
            get
            {
                return _cycle;
            }
            set { _cycle = value; }
        }


        private decimal _coldUnitPrice;
        /// <summary>
        /// 冷藏单价
        /// </summary>
        [Column("ColdUnitPrice")]
        public decimal ColdUnitPrice
        {
            get
            {
                return _coldUnitPrice;
            }
            set { _coldUnitPrice = value; }
        }


        private int _tonnage;
        /// <summary>
        /// 不足n吨算n吨
        /// </summary>
        [Column("Tonnage")]
        public int Tonnage
        {
            get
            {
                return _tonnage;
            }
            set { _tonnage = value; }
        }


        private decimal _totalTon;
        /// <summary>
        /// 总吨重
        /// </summary>
        [Column("TotalTon")]
        public decimal TotalTon
        {
            get
            {
                return _totalTon;
            }
            set { _totalTon = value; }
        }


        private int _total;
        /// <summary>
        /// 总件数
        /// </summary>
        [Column("Total")]
        public int Total
        {
            get
            {
                return _total;
            }
            set { _total = value; }
        }


        private decimal _inAmount;
        /// <summary>
        /// 转入金额
        /// </summary>
        [Column("InAmount")]
        public decimal InAmount
        {
            get
            {
                return _inAmount;
            }
            set { _inAmount = value; }
        }


        private decimal _outAmout;
        /// <summary>
        /// 转出金额
        /// </summary>
        [Column("OutAmout")]
        public decimal OutAmout
        {
            get
            {
                return _outAmout;
            }
            set { _outAmout = value; }
        }


        private string _currentDayColdCost;
        /// <summary>
        /// 当天冷藏费
        /// </summary>
        [Column("CurrentDayColdCost")]
        public string CurrentDayColdCost
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_currentDayColdCost))
                    _currentDayColdCost = string.Empty;
                return _currentDayColdCost;
            }
            set { _currentDayColdCost = value; }
        }


        private string _remark;
        /// <summary>
        /// 备注
        /// </summary>
        [Column("Remark")]
        public string Remark
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_remark))
                    _remark = string.Empty;
                return _remark;
            }
            set { _remark = value; }
        }


        private System.DateTime _createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        public System.DateTime CreateTime
        {
            get
            {
                if (_createTime == DateTime.MinValue)
                {
                    return DateTime.Now;//DateTime.Parse("1911-01-01");
                }
                return _createTime;
            }
            set { _createTime = value; }
        }


        private int _createUserId;
        /// <summary>
        /// 创建人id
        /// </summary>
        [Column("CreateUserId")]
        public int CreateUserId
        {
            get
            {
                return _createUserId;
            }
            set { _createUserId = value; }
        }


        private string _createUser;
        /// <summary>
        /// 创建人
        /// </summary>
        [Column("CreateUser")]
        public string CreateUser
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_createUser))
                    _createUser = string.Empty;
                return _createUser;
            }
            set { _createUser = value; }
        }


        private int _modifyUserId;
        /// <summary>
        /// 修改人id
        /// </summary>
        [Column("ModifyUserId")]
        public int ModifyUserId
        {
            get
            {
                return _modifyUserId;
            }
            set { _modifyUserId = value; }
        }


        private string _modifyUser;
        /// <summary>
        /// 修改人
        /// </summary>
        [Column("ModifyUser")]
        public string ModifyUser
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_modifyUser))
                    _modifyUser = string.Empty;
                return _modifyUser;
            }
            set { _modifyUser = value; }
        }


        private System.DateTime _modifyTime;
        /// <summary>
        /// 修改时间
        /// </summary>
        [Column("ModifyTime")]
        public System.DateTime ModifyTime
        {
            get
            {
                if (_modifyTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _modifyTime;
            }
            set { _modifyTime = value; }
        }


        private bool _isDeleted;
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted
        {
            get
            {
                return _isDeleted;
            }
            set { _isDeleted = value; }
        }

        private int _companyId;
        /// <summary>
        /// 公司
        /// </summary>
        [Column("CompanyId")]
        public int CompanyId
        {
            get
            {
                return _companyId;
            }
            set { _companyId = value; }
        }
    }
}

